Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add express endpoints for lightning invoice #5643

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

007harshmahajan
Copy link
Contributor

Adding express apis

  • list invoices
  • update wallet coin specific

Ticket: BTC-1836

@007harshmahajan 007harshmahajan marked this pull request as ready for review February 26, 2025 16:36
@007harshmahajan 007harshmahajan requested review from a team as code owners February 26, 2025 16:36
import * as t from 'io-ts';

const UpdateWalletRequest = t.intersection([
UpdateLightningWalletSignedRequest,
Copy link
Contributor

@saravanan7mani saravanan7mani Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should contain signerTlsKey instead of encryptedSignerTlsKey.

handleUpdateLightningWalletCoinSpecific should encrypt signerTlsKey to encryptedSignerTlsKey using wallet passphrase (similar to signerAdminMacaroon -> encryptedSignerAdminMacaroon)

@lcovar lcovar force-pushed the express_lightning_apis branch 3 times, most recently from 8832a80 to 220d79e Compare February 28, 2025 00:54

if (params.signerTlsKey) {
requestWithEncryption.encryptedSignerTlsKey = this.wallet.bitgo.encrypt({
password: deriveLightningServiceSharedSecret(coinName, userAuthXprv).toString('hex'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
password: deriveLightningServiceSharedSecret(coinName, userAuthXprv).toString('hex'),
password: params.passphrase,


if (params.signerMacaroon) {
requestWithEncryption.encryptedSignerMacaroon = this.wallet.bitgo.encrypt({
password: params.passphrase,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
password: params.passphrase,
password: deriveLightningServiceSharedSecret(coinName, userAuthXprv).toString('hex'),

lcovar
lcovar previously approved these changes Feb 28, 2025
@lcovar lcovar dismissed stale reviews from margueriteblair, davidkaplanbitgo, and themself via a31979f February 28, 2025 01:20
@lcovar lcovar force-pushed the express_lightning_apis branch from 220d79e to a31979f Compare February 28, 2025 01:20
ericli-bitgo
ericli-bitgo previously approved these changes Feb 28, 2025
Add
- list invoices
- update wallet coin specific

Ticket: BTC-1836
@lcovar lcovar dismissed stale reviews from davidkaplanbitgo and ericli-bitgo via 01d89de February 28, 2025 01:45
@lcovar lcovar force-pushed the express_lightning_apis branch from a31979f to 01d89de Compare February 28, 2025 01:45
@davidkaplanbitgo davidkaplanbitgo merged commit bbe3c52 into master Feb 28, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants